﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BaseUnits
{
    class CompareByPriority<T> : Comparer<T> where T : IPowerUnit
    {
        int hour;
        DateTime date;
        public CompareByPriority(DateTime date)
        {
            this.date = date;
            //this.date = new DateTime(year, 1, 1);
            //this.date = this.date.AddHours(hour);
            //this.hour = this.date.Hour;
        }
        public override int Compare(T x, T y)
        {
            return x.Priority(date).CompareTo(y.Priority(this.date));
        }
    }
}
